<template>
	<view class="bottom">
		<view class="div"></view>
		<u-tabbar :value="value" :fixed="true" inactiveColor="#B1BBC9" activeColor="#3C7CFF" :placeholder="false" :safeAreaInsetBottom="true">
			<u-tabbar-item v-for="(item,key) in list" :key="key" :text="item.text" :name="item.text" @click="toUrl(item)">
				<image class="icon" mode="widthFix" slot="inactive-icon" :src="item.img"></image>
				<image class="icon" mode="widthFix" slot='active-icon' :src='item.imgs'></image>
			</u-tabbar-item>
		</u-tabbar>
	</view>
</template>

<script>
	export default{
		props:['value'],
		data(){
			return{
				list:[
					{text:'首页',url:'/pages/index/index',img:require('@/static/img/sy.png'),imgs:require('@/static/img/syc.png')},
					{text:'被子租赁',url:'/pages/index/zp',img:require('@/static/img/zp.png'),imgs:require('@/static/img/zpc.png')},
					{text:'商城',url:'/pages/index/shop',img:require('@/static/img/shop.png'),imgs:require("@/static/img/shopc.png")},		
					{text:'我的',url:'/pages/index/my',img:require('@/static/img/my.png'),imgs:require('@/static/img/myc.png')}
				]
			}
		},
		methods:{
			toUrl(item){
				this.$project.toTable(item.url);
			}
		}
	}
</script>

<style lang="scss" scoped>
	
	.div{
		width: 100%;
		height: 100rpx;
		background: #F4F4F4;
	}
	.bottom{
		width: 100%;
		background: #fff;
		
	}
	.icon{
		width: 40rpx;
		
	}
	
	
	
</style>
